<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>switch判断语句</title>
</head>
<body>
<script>
   var width=88;
   switch (width){
       case 100:
            document.write("width:"+width);
           break;
       case 101:
            document.write("width101:"+width);
           break;
       default:
            document.write("default:"+width);
           break;
   }
</script>
</body>
</html>




<!-- 
var weekday="星期一";
switch(weekday){
    case "星期一":
        document.write("开始新的一周工作！");
        break;
    case "星期五":
        document.write("今天是本周最后一天，明天就可以休息了！");
        break;
    default:
        document.write("努力、努力再努力");
        break;
    } -->
